home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 50
/
Volume 50 - JOGO DISK .iso
/
Games
/
nicewory.swf
/
scripts
/
frame_4
/
DoAction.as
Wrap
Text File
|
2007-10-01
|
2KB
|
76 lines
this.stop();
FNscore = function(s, num)
{
var _loc2_ = 1;
while(_loc2_ <= 6)
{
_root.menu_mc[s + _loc2_].gotoAndStop(Math.floor(num / Math.pow(10,_loc2_ - 1)) % 10 + 1);
_loc2_ = _loc2_ + 1;
}
};
game_start = true;
score = 0;
FNscore("s",score);
this.onEnterFrame = function()
{
if(_root.game_start)
{
if(this._xmouse > 50 && this._xmouse < 500)
{
this.man1._x = this._xmouse - 50;
}
if(man1._currentframe == 2)
{
time_mc.time_bar.nextFrame();
}
}
};
this.onMouseDown = function()
{
if(man1._currentframe == 1 && _root.game_start)
{
man1.gotoAndStop(2);
}
};
this.onMouseUp = function()
{
if(_root.game_start)
{
if(man1.hit1.hitTest(mc))
{
mc.shot = true;
mc.speedX = random(5) - 9;
man1.gotoAndStop(3);
}
else if(man1.hit2.hitTest(mc))
{
mc.shot = true;
mc.speedX = random(5) - 2;
man1.gotoAndStop(3);
}
else if(man1.hit3.hitTest(mc))
{
mc.shot = true;
mc.speedX = random(5) + 5;
man1.gotoAndStop(3);
}
else
{
man1.gotoAndStop(4);
}
}
};
FNre = function()
{
if(_root.game_start)
{
this.mc.speedX = 10;
this.mc._x = this.mc.X;
this.mc._y = this.mc.Y;
this.mc._xscale = 100;
this.mc._yscale = 100;
this.mc.shot = false;
this.mc.gotoAndStop(1);
}
};